from pymongo import MongoClient
import pandas as pd

client = MongoClient()
collection = client['douban']['tv1']

data = list(collection.find())
# print(data)
data_list = []
for i in data:
    temp = {}
    temp['info'] = i['info']
    temp['title'] = i['title']
    data_list.append(temp)


df = pd.DataFrame(data_list)
# print(df)

# 显示头几行
print(df.head())
#
# # 显示后几行
# print(df.tail())

# 展示df的概览
# print(df.info())

print(df.describe())



